package cn.itcast.demo4;

public class Animal {
    //他们共有的属性是name，age，sex
    //共同行为是eat
    //成员变量
    private String name;
    private int age;
    private String sex;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }


    public void eat(){
        System.out.println("正在吃");
    }
}
